//
//  BanBuAPIs.h
//  BanBu
//
//  Created by zhengziyan19 on 12-8-1.
//
//

#import <Foundation/Foundation.h>
//#define  BanBuHost  @"http://www.halfeet_cn"
#define  BanBuHost  @"http://app.koochat.com"
//#define  BanBuHost  @"http://koochat.duapp.com"
//#define  BanBuHost  @"http://192.168.1.10";

//2014年10月20日09:41:03 by yinlin 获取短网址
static NSString * const Banbu_GetShortUrl = @"/_sys_dict/_get_short_url.php?jsonfrom=";


static NSString *const Banbu_Get_Vipuser_Nearby = @"/_near_user/_get_vipuser_nearby.php?jsonfrom=";


static NSString * const Banbu_Get_ALLVersion = @"/_sys_dict/_get_serverdata_version.php?jsonfrom=";//获取系统内所有版本信息 如：气泡、彩蛋、表情、主题等


static NSString *const BanBu_Get_Space_Picture_Sound_List = @"/_sys_dict/_get_space_picture_sound_list.php?jsonfrom="; //获取我的空间系统内置飘动的透明图和背景音乐列表

static NSString *const BanBu_Set_Spaceset_Byuser = @"/_user_login/_set_spaceset_byuser.php?jsonfrom="; //用户个人空间的设置
//static NSString *const BanBu_Sys_Dict = @"/_sys_dict/_get_sayhi_rand.php?jsonfrom=";

//static NSString *const BanBu_Get_Server_List =@"/_app/_get_server_list.php?jsonfrom=";\
//_user_login/_set_user_phonelist.php

static NSString *const BanBu_Link_User_Tomany_Onekey = @"/_friend/_link_user_tomany_onekey.php?jsonfrom=";
static NSString *const BanBu_Set_My_Pushid = @"/_user_login/_set_my_pushid.php?jsonfrom=";
static NSString *const BanBu_Set_Register_User_Onekey = @"/_user_login/_set_register_user_onekey.php?jsonfrom=";
static NSString *const BanBu_Set_User_Phonelist = @"/_user_login/_set_user_phonelist.php?jsonfrom=";
static NSString *const BanBu_Send_Verify_Invite_Touser = @"/_user_chat/_send_verify_invite_touser.php?jsonfrom=";
static NSString *const BanBu_Set_Vipuser_Request_Byuser = @"/_user_login/_set_vipuser_request_byuser.php?jsonfrom=";
static NSString *const BanBu_Set_My_Face_Default = @"/_user_login/_set_my_face_default.php?jsonfrom=";//设置我的默认头像
static NSString *const BanBu_Get_User_Sns_Idlist = @"/_user_login/_get_user_sns_idlist.php?jsonfrom=";//获取社交网络列表
static NSString *const BanBu_Set_User_Sns_Idlist = @"/_user_login/_set_user_sns_idlist.php?jsonfrom=";//修改社交网络列表
static NSString *const BanBu_Get_Invitecode_Byuser = @"/_user_login/_get_invitecode_byuser.php?jsonfrom=";//获取安卓邀请码
static NSString *const BanBu_Post_Video_Byverify = @"/_user_login/_post_video_byverify.php?jsonfrom=";//上传视频认证
static NSString *const BanBu_Get_Video_Verify = @"/_near_user/_get_video_verify_nearby.php?jsonfrom=";//获取附近vip
static NSString *const BanBu_Get_Infor_Edit_Online = @"/_sys_dict/_get_infor_edit_online.php?jsonfrom=";//获取在线编辑关键字
static NSString *const BanBu_Get_Infor_Status_Online = @"/_sys_dict/_get_infor_status_online.php?jsonfrom=";//获取在线编辑关键字
static NSString *const BanBu_Reset_Userpw_Byemail = @"/_user_login/_reset_userpw_byemail.php?jsonfrom=";//重置密码
static NSString *const BanBu_Get_Weather = @"/_sys_dict/_get_weather_bylonglat.php?jsonfrom=";//获取本地天气

static NSString *const BanBu_Set_Account_Destroy = @"/_user_login/_set_account_destroy.php?jsonfrom=";//销毁账号
static NSString *const BanBu_Get_Actioncount_Byfuid_V2 = @"/_friend/_get_actioncount_byfuid_v2.php?jsonfrom=";
static NSString *const BanBu_Get_Server_List = @"/_system/_get_server_list_v2.php?jsonfrom=";
static NSString *const BanBu_Set_MyFollowHidden = @"/_user_login/_set_my_follow_hidden.php?jsonfrom=";//隐藏关注的人
//需要推送状态通知

static NSString *const BanBu_Set_Myphone_Offline = @"/_system/_set_myphone_offline.php?jsonfrom=";

//相册操作接口********
static NSString *const BanBu_Set_Albumface_Byalbum = @"/_album/_set_albumface_byalbum.php?jsonfrom=";
static NSString *const BanBu_Get_Passlist_Byalbum = @"/_album/_get_passlist_byalbum.php?jsonfrom=";//临时密码
static NSString *const BanBu_Create_Album_Byuser = @"/_album/_create_album_byuser.php?jsonfrom=";//创建相册
static NSString *const BanBu_Get_Albumlist_Byuser = @"/_album/_get_albumlist_byuser.php?jsonfrom=";//获取相册列表
static NSString *const BanBu_Modify_Album_Byuser = @"/_album/_modify_album_byuser.php?jsonfrom=";//修改相册信息
static NSString *const BanBu_Post_Albumfile_Byuser = @"/_album/_post_albumfile_byuser.php?";//上传相册文件
static NSString *const BanBu_Get_Listof_Albumid = @"/_album/_get_listof_albumid.php?jsonfrom=";//获取相册的图片列表
static NSString *const BanBu_Check_Passof_Byalbum = @"/_album/_check_passof_byalbum.php?jsonfrom=";//检测密码输入是否正确
static NSString *const BanBu_Delete_Fileof_Albumid = @"/_album/_delete_fileof_albumid.php?jsonfrom=";//删除相册内图片或视频
static NSString *const BanBu_Delete_Album_Byuser = @"/_album/_delete_album_byuser.php?jsonfrom=";//删除相册
//******************
static NSString *const BanBu_Get_Friendlist_Byuid = @"/_friend/_get_friendlist_byuid_v2.php?jsonfrom=";//根据userid获取用户的 粉丝、关注列表
static NSString *const BanBu_Get_Friend_FriendDos_Broadcast = @"/_friend/_get_friendaction_ofmy_v3.php?jsonfrom=";//广播页面的获取用户好友广播动态

static NSString *const BanBu_Set_Online_Hideme = @"/_user_login/_set_online_hideme_v2.php?jsonfrom=";//隐身设置

static NSString *const BanBu_Get_Theme_List = @"/_sys_dict/_get_theme_list_v2.php?jsonfrom=";//主题列表获取

static NSString *const BanBu_Get_System_Facelist = @"/_user_login/_get_system_facelist.php?jsonfrom=";//获取系统默认头像
static NSString * const BanBu_SetPushClose_FromTo = @"/_user_login/_set_user_pushclose_fromto.php?jsonfrom=";     //设置免打扰时间
//static NSString *const BanBu_Get_Server_List = @"/_apps/_get_server_list.php?jsonfrom=";//获取服务器列表

static NSString *const Banbu_Send_Feedback = @"/_sys_dict/_send_feedback.php?jsonfrom=";//反馈意见
//新添根据本地未读消息数量来通知服务器应该显示的推送数量加到应用程序角标处
static NSString *const Banbu_Set_User_Pushcount = @"/_user_login/_set_user_pushcount.php?jsonfrom="; //推送消息数量/未读消息数量
static NSString *const Banbu_Set_User_Pushid = @"/_user_login/_set_user_pushid.php?jsonfrom="; //清除我的推送ID


/*登录注册相关  start*/

static NSString *const BanBu_Check_Email = @"/_user_login/_check_email_register.php?jsonfrom="; //检验邮箱是否可用
static NSString *const BanBu_Register_Email = @"/_user_login/_register_email.php?jsonfrom="; //注册邮箱
static NSString *const BanBu_Check_Login = @"/_user_login/_check_user_login_v2.php?jsonfrom=";  //用户登录校验

static NSString *const BanBu_Check_Login_Bind = @"/_user_login/_check_user_login_bind_v2.php?jsonfrom="; //用户绑定登录校验

static NSString *const BanBu_Set_User_Info = @"/_user_login/_set_user_infor.php?jsonfrom=";  //用户个人资料设置
static NSString *const BanBu_Get_User_Info = @"/_user_login/_get_user_infor_v2.php?jsonfrom=";  //用户个人资料及头像列表读取
static NSString *const BanBu_Set_User_Avatar = @"/_user_login/_base64_user_face.php?";       //注册时上传头像
static NSString *const BanBu_Get_My_Info = @"/_user_login/_get_my_infor.php?jsonfrom=";       //读取自已的个人资料
static NSString *const BanBu_Set_My_Info = @"/_user_login/_set_my_expandext_v2.php?jsonfrom=";   //修改自已的个人资料之扩展资料
static NSString *const BanBu_Del_My_Avatar = @"/_user_login/_del_user_face.php?jsonfrom=";     //删除用户头像照片
static NSString *const BanBu_Upload_My_Photos = @"/_user_login/_upload_my_photos.php?";       //上传多个头像
static NSString *const BanBu_Get_My_Facelist = @"/_user_login/_get_my_facelist.php?jsonfrom=";       //下载多个头像
static NSString *const BanBu_Set_User_Password = @"/_user_login/_set_user_password.php?jsonfrom=";     //修改密码


/*+++++++++++++++++++++++++++++++*/
static NSString *const BanBu_Set_Register_User = @"/_user_login/_set_register_user.php?jsonfrom=";     //一步提交
static NSString *const BanBu_Set_User_View = @"/_user_login/_set_user_view_link_v2.php?jsonfrom=";     //声明访问了该用户

//社交网站帐号绑定
static NSString *const BanBu_Set_User_accountbind = @"/_user_login/_set_user_accountbind.php?jsonfrom=";

//好友的备注名
static NSString *const BanBu_Set_FriendName = @"/_friend/_set_friendname_byfuid.php?jsonfrom=";
static NSString *const BanBu_Get_FriendName_OfMy = @"/_friend/_get_friendname_ofmy.php?jsonfrom=";

/*登录注册相关   end*/


/*广播动态相关  start*/

//static NSString *const BanBu_Send_Broadcast = @"/_broad_cast/_send_broad_cast_temp.php?jsonfrom=";
static NSString *const BanBu_Send_Broadcast = @"/_broad_cast/_send_broad_cast.php?jsonfrom=";
static NSString *const BanBu_Get_Broadcast = @"/_broad_cast/_get_broadcast_byid.php?jsonfrom=";
static NSString *const BanBu_Reply_Broadcast = @"/_broad_cast/_reply_broad_cast.php?jsonfrom=";
static NSString *const BanBu_Report_Broadcat = @"/_broad_cast/_report_broadcast_byid.php?jsonfrom=";   //举报一条动态
static NSString *const BanBu_Vote_Broadcast = @"/_broad_cast/_vote_broadcast_byid.php?jsonfrom=";//喜欢，分享动态(广播)信息
static NSString *const BanBu_Delete_Broadcast = @"/_broad_cast/_delete_broad_byid.php?jsonfrom=";//删除自己的广播
static NSString *const BanBu_Get_Broad_Hotkey = @"/_broad_cast/_get_broad_hotkey.php?jsonfrom=";//搜索广播热门关键词
static NSString *const BanBu_Get_Broadmaster_byid = @"/_broad_cast/_get_broadmaster_byid.php?jsonfrom=";//获取单个人的广播（富文本用）
/*广播动态相关  end*/

/*附近好友相关  start*/

static NSString *const BanBu_Set_User_Location = @"/_near_user/_set_user_location.php?jsonfrom=";   //提交我的坐标
static NSString *const BanBu_Get_User_Nearby = @"/_near_user/_get_user_nearby_v3.php?jsonfrom=";       //附近的用户
static NSString *const BanBu_Get_User_Neardo = @"/_near_user/_get_user_neardo_v3.php?jsonfrom=";       //附近的动态
static NSString *const BanBu_Get_User_Nearmy = @"/_near_user/_get_user_nearmy_v3.php?jsonfrom=";
/*附近好友相关  end*/

/*好友信息相关  start*/
static NSString *const BanBu_Report_User = @"/_friend/_report_user_bycase.php?jsonfrom=";//举报并拉黑
static NSString *const BanBu_Set_Friend_Link = @"/_friend/_link_user_touser_v2.php?jsonfrom="; //好友关系变更，参数为black时，就是拉黑
static NSString *const BanBu_Get_Friend_ViewList = @"/_friend/_get_viewerlist_ofmy_v2.php?jsonfrom=";       //返回看过我的人列表
//static NSString *const BanBu_Get_Friend_ViewList = @"/_friend/_get_viewerlist_ofmy.php?jsonfrom=";       //返回看过我的人列表

static NSString *const BanBu_Get_Friend_OfMy = @"/_friend/_get_friendlist_ofmy_v2.php?jsonfrom=";       //按类别好友的列表

static NSString *const BanBu_Get_Friend_FriendDo = @"/_friend/_get_friendaction_byfuid_v3.php?jsonfrom=";       //一个用户的动态列表
static NSString *const BanBu_Get_Friend_FriendDos = @"/_friend/_get_friendaction_ofmy.php?jsonfrom=";      //好友动态列表

/*好友信息相关  end*/


/*上传文件相关  start*/

static NSString *const BanBu_UploadFile_To_Server = @"/_post_file/_post_file_byuser.php?jsonfrom="; //上传文件
static NSString *const BanBu_Post_File_Bybroad = @"/_post_file/_post_file_bybroad_v3.php?jsonfrom";
static NSString *const BanBu_Post_File_Bychat = @"/_post_file/_post_file_bychat_v3.php?jsonfrom";
static NSString *const BanBu_AddFavFile_ByPost = @"/_user_chat/_add_fav_file_bypost.php?jsonfrom";  //上传收藏的图片

/*上传文件相关  end*/


/*聊天相关  start*/
#pragma mark - 聊天对话接口
static NSString * const BanBu_ReceiveMessage_From_Server_V4 = @"/_system/_get_system_message_v4.php?jsonfrom=";  //读取消息列表 不区分限定用户和所有用户

static NSString * const BanBu_SendMessage_To_Server_V2 = @"/_user_chat/_send_message_touser_v2.php?jsonfrom=";  //群发消息

//static NSString * const BanBu_GetMoreBubbleImage  = @"/_sys_dict/_get_bubble_list.php?jsonfrom=";               //获取更多聊天气泡图片
static NSString * const BanBu_GetMoreBubbleImage  = @"/_sys_dict/_get_bubble_list_v3.php?jsonfrom=";               //获取更多聊天气泡图片

static NSString * const BanBu_GetBGMoreList = @"/_sys_dict/_get_bgmovie_list.php?jsonfrom=";                    //获取更多
static NSString * const BanBu_Get_Flash_text = @"/_sys_dict/_get_flash_text.php?jsonfrom=";                     //获取闪光字图片
static NSString * const BanBu_GetFriendList_transmit = @"/_friend/_get_friendlist_base_ofmy.php?jsonfrom=";     //转发时获取好友列表

static NSString * const BanBu_GetMagicGif_list = @"/_sys_dict/_get_magic_gif_list.php?jsonfrom=";               //获取所有要显示的魔法表情
static NSString * const BanBu_GetMagicGid_detail = @"/_sys_dict/_get_magic_gif_detail.php?jsonfrom=";            //获取具体的魔法表情
static NSString * const BanBu_Get_Huoxing_text = @"/_sys_dict/_get_huoxing_text.php?jsonfrom=";                 //转换为火星文

static NSString * const BanBu_getKeyword_eggList = @"/_sys_dict/_get_keyword_egglist.php?jsonfrom=";                 //下载菜单关键字url和版本信息
#pragma mark - 作废的聊天对话接口
static NSString * const BanBu_SendMessage_To_Server = @"/_user_chat/_send_message_touser.php?jsonfrom=";       //发送消息至指定用户
static NSString * const BanBu_ReceiveMessage_From_Server_V2 = @"/_system/_get_system_message_v2.php?jsonfrom=";      //读取消息列表 不区分限定用户和所有用户  addBy Wang Xj at time 2013-7-8 13：49
static NSString * const BanBu_ReceiveMessage_From_Server_V3 = @"/_system/_get_system_message_v3.php?jsonfrom=";  //读取消息列表 不区分限定用户和所有用户
#pragma mark -

static NSString *const BanBu_readMessage_byuser=@"/_user_chat/_set_readmsg_byuser.php?jsonfrom=";// 向服务器发送信息我已经读了对方

static NSString *const BanBu_Send_Request_To_User = @"/_friend/_send_request_touser.php?jsonfrom=";//请求加为好友
static NSString *const BanBu_Get_Request_From_All = @"/_friend/_get_request_fromall.php?jsonfrom=";//请求加我为好友的用户的列表
static NSString *const BanBu_Delete_Request_ByIDList = @"/_friend/_delete_request_byidlist.php?jsonfrom=";//删除请求列表

static NSString * const BanBu_GetFaceStoreList = @"/_sys_dict/_get_facestore_list.php?jsonfrom=";    //下载菜单关键字url和版本信息

/*聊天相关  end*/
/* 获取不文明的语言、*/

static NSString *const BanBu_BadWordto_check=@"/_sys_dict/_get_badwords_packet.php?jsonfrom=";

static NSString *const BanBu_Internationar_Language=@"/_sys_dict/_get_language_packet_v2.php?jsonfrom=";
/*各种破冰语*/
static NSString *const BanBu_Get_Sayhi_Rand = @"/_sys_dict/_get_sayhi_rand_v2.php?jsonfrom=";
static NSString *const BanBu_Get_Sayhi_Hot = @"/_sys_dict/_get_sayhi_hot_v2.php?jsonfrom=";

static NSString *const BanBuDataformatError = @"CJSONScannerErrorDomain";

// const string

static NSString *const BuddyListPage = @"BuddyListPage";
static NSString *const FriendListPage = @"FriendListPage";
static NSString *const DosListPage = @"DosListPage";

static NSString *const ListKey = @"listtype";
static NSString *const PageNo = @"pageno";
static NSString *const Latitude = @"plat";
static NSString *const Longitude = @"plong";
static NSString *const LinkTouID = @"linktouid";
static NSString *const ReportTouID = @"touid";

static NSString *const Action = @"action";
static NSString *const MyProfile = @"MyProfile";
static NSString *const FriendShip = @"friendlist";

// keys

static NSString *const KeyFromUid = @"userid";
static NSString *const KeyMyUid = @"myid";
static NSString *const KeyMediaStatus = @"mediastatus";
static NSString *const KeyMe = @"me";
static NSString *const KeyUface = @"uface";
static NSString *const KeyPname = @"pname";
static NSString *const KeyDistmeter = @"distmeter";
static NSString *const KeyDisttime = @"disttime";
static NSString *const KeyOldyears = @"oldyears";
static NSString *const KeyAge = @"oldyears";
static NSString *const KeySayme = @"sayme";
static NSString *const KeyGender = @"gender";
static NSString *const KeySex = @"sex";
static NSString *const KeySays = @"says";
static NSString *const KeyLasttalk = @"content";
static NSString *const KeyType = @"type";
static NSString *const KeyStime = @"stime";
static NSString *const KeyContent = @"content";
static NSString *const KeyID = @"ID";
static NSString *const KeyChatid = @"chatid";
static NSString *const KeyStimeIndex = @"stimeIndex";//用于排序
static NSString *const KeyEffectiveTime = @"effectiveTime";//有效时间

static NSString *const KeyStatus = @"status";
static NSString *const KeyHeight = @"height";
static NSString *const KeyShowtime = @"showtime";
static NSString *const KeyUid = @"touid";
static NSString *const KeyUname = @"pname";
static NSString *const KeyUnreadNum = @"unreadnum";
static NSString *const KeyFileUrl = @"fileurl";
static NSString *const KeyFromUidTalk=@"fromuid";
static NSString *const KeyFacelist=@"facelist";
static NSString *const KeyShowFrom=@"msgfrom"; 
static NSString *const KeyAndroidFrom=@"msgfrom";
static NSString *const KeyMsglist=@"msglist";



// 新添的个人资料的字段
static NSString *const KeyCompany=@"company";
static NSString *const KeyHbody=@"hbody";
static NSString *const KeyJobtitle=@"jobtitle";
static NSString *const KeyLiked=@"liked";
static NSString *const KeyLovego=@"lovego";
static NSString *const KeySchool=@"school";
static NSString *const KeySstar=@"sstar";
static NSString *const KeyWbody=@"wbody";
static NSString *const KeyXblood=@"xblood";

static NSString *const KeyDmeter=@"dmeter";
static NSString *const KeyShowContent = @"showcontent";

//static NSString *const KeyDtime=@"ltime";

static NSString *const KeyOnLinetime=@"ltime";
static NSString *const DBFieldType_BOOL = @"bool";
static NSString *const DBFieldType_INTEGER = @"integer";
static NSString *const DBFieldType_TEXT = @"text";
static NSString *const DBFieldType_DATA = @"blob";



static NSString *const keyPersonalInfo = @"userinfor";
static NSString *const keyUpdateTime = @"updatetime";

static NSString *const KeyBubbleID = @"bubbleID";


static NSString *const KeyThumbnail = @"thumbnail";

static NSString *const KeyLevel = @"level";
static NSString *const KeyLinkTo = @"linkto";
static NSString *const KeyDataKey = @"datakey";
static NSString *const KeyDetailData = @"detaildata";
static NSString *const KeyLastSeeDynamicTime = @"lastseetime";

static NSString *const KeyLastSeeFriendDynamicTime =  @"lastseefrienddynamictime";
static NSString *const KeyLastSeeMoDynamicTime     =  @"lastseemodynamictime";
static NSString *const KeyUnReadDynamicNum = @"unreaddynamicnum";
static NSString *const keyAlbumPassword = @"albumpassword";
static NSString *const keyUserHaveSeen=@"userhaveseen";


#define typeArrDefine [NSArray arrayWithObjects:@"text",@"image",@"location",@"sound",@"emi",@"hints",@"video",@"magicGif",@"specialApp",nil]

#define contentArrDefine [NSArray arrayWithObjects:@"text",NSLocalizedString(@"talkPicture", nil),NSLocalizedString(@"talkLocation", nil),NSLocalizedString(@"talkSound", nil),NSLocalizedString(@"emitionType", nil),@"hints",NSLocalizedString(@"talkVideo", nil),NSLocalizedString(@"magicGif", nil),NSLocalizedString(@"specialText", nil),nil]

#define kSendMsgAllTypeNotification @"kSendMsgAllTypeNotification"
#define kSendSnapTextNotification @"kSendSnapTextNotification"

#define kVisitCardHeader @"<!doctype html> <html> <head> <meta charset='utf-8'> <style type='text/css'> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; }</style> </head> <body> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td style='border-bottom: dotted #CCCCCC 1px;'><table width='100%' border='0' cellspacing='0' cellpadding='3'> <tr> <td width='2'>&nbsp;</td> <td style='color: #CCCCCC; font-size:14px;'>"

#define kVisitCardFace   @"</td> </tr> </table></td> </tr> <tr> <td><table width='100%' border='0' cellspacing='0' cellpadding='3'> <tr> <td width='30' rowspan='2'><img src='"
#define kVisitCardName   @"' width='48' height='48'></td> <td>"
#define kVisitCardUserid @"</td> <td width='10' rowspan='2'><b>〉</b></td> </tr> <tr> <td style='color: #CCCCCC;'>"
#define KVisitCardLast   @"</td> </tr> </table></td> </tr> </table> </body> </html>"

#define kVisitCard(visitCard,uface,pname,userid) [NSString stringWithFormat:@"%@%@%@%@%@%@%@%@%@",kVisitCardHeader,visitCard,kVisitCardFace,uface,kVisitCardName,pname,kVisitCardUserid,userid,KVisitCardLast]

#define NetWork_Unable @"netunable"


